<template>
  <div>
    <HeaderNav title="精彩跟帖"></HeaderNav>
    <Main v-for="comment in commentList" :key="comment.id" :commentData="comment"></Main>
  </div>
</template>

<script>
import HeaderNav from "../components/headerNav";
import Main from "../components/Main";
export default {
  components: {
    HeaderNav,
    Main,
  },
  data() {
    return {
      commentList: [],
    };
  },
  created() {
    this.$axios({
      url: "/post_comment/" + this.$route.query.id,
    }).then((res) => {
      //   console.log(res.data);
      this.commentList = res.data.data;
    });
  },
};
</script>

<style>
</style>